Changeset 326 for trunk/nom/class_c/nomcls.c
- Timestamp:
- Apr 9, 2008, 10:22:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/class_c/nomcls.c
r294 r326 40 40 #endif 41 41 42 #define INCL_DOS 43 #include <os2.h> 42 #ifdef __OS2__ 43 # define INCL_DOS 44 # include <os2.h> 45 #endif /* __OS2__ */ 46 44 47 #include <string.h> 45 48 #include <stdlib.h> 46 #include <gtk/gtk.h> 49 #ifdef NOM_WITH_GTK 50 # include <gtk/gtk.h> 51 #endif 47 52 48 53 … … 64 69 if(nomIsObj(nObj)){ 65 70 //nomPrintf("Finalizing 0x%x: %s \n", nObj, nObj->mtab->nomClassName); 66 _nomUnInit(nObj, NULL HANDLE);71 _nomUnInit(nObj, NULL); 67 72 } 68 73 //else … … 80 85 81 86 if(!_ncpObject) 82 return NULL HANDLE;87 return NULL; 83 88 84 89 ncp=(NOMClassPriv*)_ncpObject; … … 86 91 /* Allocate memory big enough to hold an object. This means the size is that of the 87 92 mtab pointer and all instance variables. */ 88 if((nObj=_nomAllocate(nomSelf, ncp->mtab->ulInstanceSize, NULL HANDLE))==NULLHANDLE)89 return NULL HANDLE;93 if((nObj=_nomAllocate(nomSelf, ncp->mtab->ulInstanceSize, NULL))==NULL) 94 return NULL; 90 95 91 96 /* _nomInit() is called in _nomRenew() */ 92 return _nomRenew(nomSelf, (CORBA_Object)nObj, NULL HANDLE); /* This will also init the object */97 return _nomRenew(nomSelf, (CORBA_Object)nObj, NULL); /* This will also init the object */ 93 98 } 94 99 … … 135 140 tempEnv.fFlags=NOMENV_FLG_DONT_CHECK_OBJECT; 136 141 #endif 137 _nomRenewNoInit(nomSelf, nomObj, NULL HANDLE);142 _nomRenewNoInit(nomSelf, nomObj, NULL); 138 143 139 144 /* And now give the object the possibility to initialize... */ 140 145 /* Make sure the object is not checked. */ 141 146 //_nomInit((NOMObject*)nomObj, &tempEnv); 142 _nomInit((NOMObject*)nomObj, NULL HANDLE);147 _nomInit((NOMObject*)nomObj, NULL); 143 148 144 149 return nomObj; … … 165 170 166 171 /* The private struct characterizing the objects this meta class can create. */ 167 ncp=_nomGetObjectCreateInfo(nomSelf, NULL HANDLE);172 ncp=_nomGetObjectCreateInfo(nomSelf, NULL); 168 173 169 174 if(!ncp) … … 231 236 232 237 //The following was used before changing nomGetname() 233 //if(!_nomFindClassFromName(NOMClassMgrObject, _nomGetName(nomSelf, NULL HANDLE),234 // 0, 0, NULL HANDLE))238 //if(!_nomFindClassFromName(NOMClassMgrObject, _nomGetName(nomSelf, NULL), 239 // 0, 0, NULL)) 235 240 if(!_nomFindClassFromName(NOMClassMgrObject, _nomGetClassName(nomSelf, &tempEnv), 236 241 0, 0, &tempEnv)) … … 246 251 //ncPriv->ulIsMetaClass=1; /* Mark that we are a metaclass */ 247 252 ncPriv->ulClassFlags|=NOM_FLG_IS_METACLASS; /* Mark that we are a metaclass */ 248 _nomRegisterClass(NOMClassMgrObject, nomSelf->mtab, NULL HANDLE);253 _nomRegisterClass(NOMClassMgrObject, nomSelf->mtab, NULL); 249 254 /* Register all the methods this class introduces */ 250 255 ulNumIntroducedMethods=ncPriv->sci->ulNumStaticMethods; … … 253 258 if(*ncPriv->sci->nomSMethods[a].chrMethodDescriptor) 254 259 _nomRegisterMethod(NOMClassMgrObject, nomSelf->mtab, 255 *ncPriv->sci->nomSMethods[a].chrMethodDescriptor, NULL HANDLE);260 *ncPriv->sci->nomSMethods[a].chrMethodDescriptor, NULL); 256 261 } 257 262 /* Metaclass is registered. Register the object class this 258 263 metaclass may create. */ 259 ncPriv=(NOMClassPriv*)_nomGetObjectCreateInfo(nomSelf, NULL HANDLE);//nomSelf->mtab->nomClsInfo;264 ncPriv=(NOMClassPriv*)_nomGetObjectCreateInfo(nomSelf, NULL);//nomSelf->mtab->nomClsInfo; 260 265 if(ncPriv){ 266 #ifndef _MSC_VER 261 267 #warning !!!!! NOMClass does not have this pointer, this is a bug !!!!! 268 #endif 262 269 //ncPriv->ulIsMetaClass=0; /* Mark that we are not a metaclass (should be 0 already) */ 263 270 ncPriv->ulClassFlags&=~NOM_FLG_IS_METACLASS; /* Mark that we are not a metaclass (should be 0 already) */ 264 _nomRegisterClass(NOMClassMgrObject, ncPriv->mtab, NULL HANDLE);271 _nomRegisterClass(NOMClassMgrObject, ncPriv->mtab, NULL); 265 272 266 273 /* Register all the methods this class introduces */ … … 270 277 if(*ncPriv->sci->nomSMethods[a].chrMethodDescriptor) 271 278 _nomRegisterMethod(NOMClassMgrObject, ncPriv->mtab, 272 *ncPriv->sci->nomSMethods[a].chrMethodDescriptor, NULL HANDLE);279 *ncPriv->sci->nomSMethods[a].chrMethodDescriptor, NULL); 273 280 }/* for(a) */ 274 281 }/* ncPriv */ … … 281 288 nomPrintf("%s: Metaclass already registered, registering normal object class now.\n", __FUNCTION__); 282 289 283 ncPriv=(NOMClassPriv*)_nomGetObjectCreateInfo(nomSelf, NULL HANDLE);//nomSelf->mtab->nomClsInfo;290 ncPriv=(NOMClassPriv*)_nomGetObjectCreateInfo(nomSelf, NULL);//nomSelf->mtab->nomClsInfo; 284 291 // ncPriv->ulIsMetaClass=0; /* Mark that we are not a metaclass (should be 0 already) */ 285 292 ncPriv->ulClassFlags&=~NOM_FLG_IS_METACLASS; /* Mark that we are not a metaclass (should be 0 already) */ … … 292 299 if(*ncPriv->sci->nomSMethods[a].chrMethodDescriptor) 293 300 _nomRegisterMethod(NOMClassMgrObject, ncPriv->mtab, 294 *ncPriv->sci->nomSMethods[a].chrMethodDescriptor, NULL HANDLE);301 *ncPriv->sci->nomSMethods[a].chrMethodDescriptor, NULL); 295 302 } 296 303 //nomPrintf("%s %s \n", nomSelf->mtab->nomClassName, ncPriv->mtab->nomClassName); 297 _nomRegisterClass(NOMClassMgrObject, ncPriv->mtab, NULL HANDLE);304 _nomRegisterClass(NOMClassMgrObject, ncPriv->mtab, NULL); 298 305 } 299 306 } … … 316 323 /* Don't check object pointer. We are just created but not yet registered as a class. */ 317 324 // NOMClass_nomInit_parent(nomSelf, &tempEnv); 318 NOMClass_nomInit_parent(nomSelf, NULL HANDLE);319 } 320 321 322 323 325 NOMClass_nomInit_parent(nomSelf, NULL); 326 } 327 328 329 330
Note:
See TracChangeset
for help on using the changeset viewer.