Changeset 326 for trunk/nom/class_c
- Timestamp:
- Apr 9, 2008, 10:22:08 PM (17 years ago)
- Location:
- trunk/nom/class_c
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/class_c/nomclassmanager.c
r313 r326 44 44 #endif 45 45 46 #define INCL_DOS 47 #include <os2.h> 46 #ifdef __OS2__ 47 # define INCL_DOS 48 # include <os2.h> 49 #endif /* __OS2__ */ 50 48 51 #include <string.h> 49 #include <gtk/gtk.h> 52 #ifdef NOM_WITH_GTK 53 # include <gtk/gtk.h> 54 #endif 50 55 51 56 … … 85 90 CORBA_Environment *ev) 86 91 { 87 CORBA_Object nomRetval=NULL HANDLE;92 CORBA_Object nomRetval=NULL; 88 93 nomMethodTab * mtab; 89 94 NOMClassMgrData *nomThis = NOMClassMgrGetData(nomSelf); … … 91 96 /* This is only for NOMClass objects */ 92 97 if(strchr(className, ':')) 93 return NULL HANDLE;98 return NULL; 94 99 95 100 mtab=g_datalist_get_data(&_gdataClassList, className); … … 164 169 /* This is only for NOMClassPriv objects */ 165 170 if(strchr(className, ':')) 166 return NULL HANDLE;171 return NULL; 167 172 168 173 mtab=g_datalist_get_data(&_gdataClassList, className); … … 170 175 return mtab->nomClsInfo; 171 176 else 172 return NULL HANDLE;177 return NULL; 173 178 } 174 179 … … 214 219 NOMClassMgrData* nomThis=NOMClassMgrGetData(nomSelf); 215 220 216 if(NULL HANDLE==nomObject)221 if(NULL==nomObject) 217 222 return FALSE; 218 223 219 return (g_tree_lookup(_pClassListTree, nomObject->mtab)!= NULL HANDLE);224 return (g_tree_lookup(_pClassListTree, nomObject->mtab)!= NULL); 220 225 } 221 226 … … 234 239 235 240 /* This returns a meta class */ 236 if((oClass=_nomFindClassFromName( nomSelf, oldClass, 0, 0, NULL HANDLE))==NULLHANDLE)241 if((oClass=_nomFindClassFromName( nomSelf, oldClass, 0, 0, NULL))==NULL) 237 242 return FALSE; 238 243 239 if((rClass=_nomFindClassFromName( nomSelf, replacementClass, 0, 0, NULL HANDLE))==NULLHANDLE)244 if((rClass=_nomFindClassFromName( nomSelf, replacementClass, 0, 0, NULL))==NULL) 240 245 return FALSE; 241 246 242 247 /* Check if the class is a direct child */ 243 ncp=(NOMClassPriv*)_nomGetObjectCreateInfo(rClass, NULL HANDLE);248 ncp=(NOMClassPriv*)_nomGetObjectCreateInfo(rClass, NULL); 244 249 245 250 if(strcmp(ncp->parentMtabStruct.next->mtab->nomClassName, oldClass)) … … 269 274 return NULL; 270 275 271 if((thePath=NOMPathNew())==NULL HANDLE)276 if((thePath=NOMPathNew())==NULL) 272 277 return NULL; 273 278 -
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 -
trunk/nom/class_c/nomobj.c
r255 r326 41 41 #endif 42 42 43 #define INCL_DOS 44 #include <os2.h> 43 #ifdef __OS2__ 44 # define INCL_DOS 45 # include <os2.h> 46 #endif /* __OS2__ */ 47 45 48 #include <string.h> 46 #include <gtk/gtk.h> 49 /* #include <gtk/gtk.h> - why? */ 47 50 48 51 #include "nom.h" … … 110 113 111 114 /* Give object the chance to free resources */ 112 _nomUnInit(nomSelf, NULL HANDLE);115 _nomUnInit(nomSelf, NULL); 113 116 114 117 /* And now delete the object */ … … 155 158 It is possible that we are called by a subclass. So get the class object and let the 156 159 class object create the correct class. */ 157 nomCls=NOMObject_nomGetClass(nomSelf, NULL HANDLE);158 return NOMClass_nomNew(nomCls, NULL HANDLE);160 nomCls=NOMObject_nomGetClass(nomSelf, NULL); 161 return NOMClass_nomNew(nomCls, NULL); 159 162 } 160 163 … … 203 206 } 204 207 205 if(nomClass==_nomGetClass(nomSelf, NULL HANDLE))208 if(nomClass==_nomGetClass(nomSelf, NULL)) 206 209 return TRUE; 207 210
Note:
See TracChangeset
for help on using the changeset viewer.