Am 05.02.2014 14:52, schrieb "Martin v. Löwis":
> Am 03.02.14 15:43, schrieb Larry Hastings:
>> A: We create a PyMethodDefEx structure with an extra field: "const char
>> *signature".  We add a new METH_SIGNATURE (maybe just METH_SIG?) flag to
>> the flags, indicating that this is an extended structure.  When
>> iterating over the PyMethodDefs, we know how far to advance the pointer
>> based on this flag.
>> 
>> B: Same as A, but we add three unused pointers (void *reserved1 etc) to
>> PyMethodDefEx to give us some room to grow.
>> 
>> C: Same as A, but we add two fields to PyMethodDefEx.  The second new
>> field identifies the "version" of the structure, telling us its size
>> somehow.  Like the lStructSize field of the OPENFILENAME structure in
>> Win32.  I suspect YAGNI.
> 
> D: Add a new type slot for method signatures. This would be a
> tp_signature field, along with a new slot id Py_tp_signature. The
> signature field itself could be
> 
> struct PyMethodSignature {
>    char *method_name;
>    char *method_signature;
> };

Mostly unrelated question while seeing the "char *" here: do we (or do we
want to) support non-ASCII names for functions implemented in C?

Georg

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to