--- rpl/modules/motif/types.rplc 2017/07/12 15:42:23 1.3 +++ rpl/modules/motif/types.rplc 2017/07/22 11:30:11 1.5 @@ -8,15 +8,15 @@ declareTypeExtension(dup) oObject = (*((structObject **) arg)); - if (nullified(nObject = allocation(s_etat_processus, EXT))) + if (subType(oObject) == APPCONTEXT) { - typeSystemError; - } + if (nullified(nObject = allocation(s_etat_processus, EXT))) + { + typeSystemError; + } - initializeObject(nObject, oObject); + initializeObject(nObject, oObject); - if (subType(oObject) == APPCONTEXT) - { if (nullified(objectContainer(nObject) = malloc(sizeof(XtAppContext)))) { @@ -28,8 +28,19 @@ declareTypeExtension(dup) target((sXtAppContext *) objectContainer(nObject)).context = target((sXtAppContext *) objectContainer(oObject)).context; } + else if (subType(oObject) == CALLBACK) + { + typeError; + } else if (subType(oObject) == WIDGET) { + if (nullified(nObject = allocation(s_etat_processus, EXT))) + { + typeSystemError; + } + + initializeObject(nObject, oObject); + if (nullified(objectContainer(nObject) = malloc(sizeof(sXtAppContext)))) { @@ -57,6 +68,10 @@ declareTypeExtension(drop) { free(objectContainer(oObject)); } + else if (subType(oObject) == CALLBACK) + { + free(objectContainer(oObject)); + } else if (subType(oObject) == WIDGET) { free(objectContainer(oObject)); @@ -86,6 +101,16 @@ declareTypeExtension(disp) sprintf(s, "XtAppContext $ %016llX", (long long unsigned int) objectContainer(oObject)); } + else if (subType(oObject) == CALLBACK) + { + if ((s = malloc(28 * sizeof(unsigned char))) == NULL) + { + typeSystemError; + } + + sprintf(s, "Callback $ %016llX", + (long long unsigned int) objectContainer(oObject)); + } else if (subType(oObject) == WIDGET) { if ((s = malloc(26 * sizeof(unsigned char))) == NULL)