[patch] varargs use
David Zeuthen
david@fubar.dk
Mon, 01 Mar 2004 13:23:02 +0100
--=-qMj3aocah+1YhypxZ6mL
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Sat, 2004-02-28 at 19:12, Havoc Pennington wrote:
> Hi,
>
> Patch looks good. For licensing you probably want to check glib
> ChangeLog or cvs annotate to see who made that patch. My guess is Tim
> Janik.
>
Your guess is correct. Tim also pointed out some flaws in the patch, so
here is yet another one.
Tim: Ok to relicense this under AFL 2.0 and GPL?
Havoc: Ok to apply?
Thanks,
David
--=-qMj3aocah+1YhypxZ6mL
Content-Disposition: attachment; filename=dze_va_copy_macro_and_fix-5.patch
Content-Transfer-Encoding: base64
Content-Type: text/x-patch; name=dze_va_copy_macro_and_fix-5.patch; charset=
PyBweXRob24vLmRlcHMNCj8gcHl0aG9uLy5saWJzDQo/IHB5dGhvbi9NYWtlZmlsZQ0KPyBweXRo
b24vTWFrZWZpbGUuaW4NCj8gcHl0aG9uL2RidXNfYmluZGluZ3MuYw0KPyBweXRob24vZGJ1c19i
aW5kaW5ncy5sYQ0KPyBweXRob24vZGJ1c19iaW5kaW5ncy5sbw0KPyBweXRob24vZGJ1c19iaW5k
aW5ncy5weXgNCj8gdGVzdC9nbGliLy5kZXBzDQo/IHRlc3QvZ2xpYi8ubGlicw0KPyB0ZXN0L2ds
aWIvTWFrZWZpbGUNCj8gdGVzdC9nbGliL01ha2VmaWxlLmluDQo/IHRlc3QvZ2xpYi90ZXN0LWRi
dXMtZ2xpYg0KPyB0ZXN0L2dsaWIvdGVzdC1wcm9maWxlDQo/IHRlc3QvZ2xpYi90ZXN0LXNlcnZp
Y2UtZ2xpYg0KPyB0ZXN0L2dsaWIvdGVzdC10aHJlYWQtY2xpZW50DQo/IHRlc3QvZ2xpYi90ZXN0
LXRocmVhZC1zZXJ2ZXINCj8gdG9vbHMvZGJ1cy12aWV3ZXINCkluZGV4OiBDaGFuZ2VMb2cNCj09
PT09PT09PT09PT09PT09PT09PT09PT09PT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