mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Added PEP253 support to most Carbon modules. This isn't complete yet:
some of the more compilcated cases (CF, Res) haven't been done yet. Also, various types should inherit from each other (anything with an as_Resource method should be a Resource subtype, the CF types should become one family).
This commit is contained in:
parent
99899b92b8
commit
96cebde909
43 changed files with 1592 additions and 534 deletions
|
@ -79,14 +79,14 @@ ComponentResult = Type("ComponentResult", "l")
|
|||
|
||||
ComponentResourceHandle = OpaqueByValueType("ComponentResourceHandle", "ResObj")
|
||||
|
||||
class MyCIObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||
class MyCIObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||
def outputCheckNewArg(self):
|
||||
Output("""if (itself == NULL) {
|
||||
PyErr_SetString(Cm_Error,"NULL ComponentInstance");
|
||||
return NULL;
|
||||
}""")
|
||||
|
||||
class MyCObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||
class MyCObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||
def outputCheckNewArg(self):
|
||||
Output("""if (itself == NULL) {
|
||||
/* XXXX Or should we return None? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue