소스 검색

Added null object function test.

woollybah 8 년 전
부모
커밋
c7b6a26f7f
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      blitz.mod/blitz_object.c
  2. 2 0
      blitz.mod/blitz_object.h

+ 6 - 0
blitz.mod/blitz_object.c

@@ -227,3 +227,9 @@ BBDebugScope * bbObjectStructInfo( char * name ) {
 	
 	return 0;
 }
+
+BBObject * bbNullObjectTest( BBObject *o ) {
+	if (o == &bbNullObject) brl_blitz_NullObjectError();
+	return o;
+}
+

+ 2 - 0
blitz.mod/blitz_object.h

@@ -93,6 +93,8 @@ struct struct_node {
 void bbObjectRegisterStruct( BBDebugScope *p );
 BBDebugScope * bbObjectStructInfo( char * name );
 
+BBObject * bbNullObjectTest( BBObject *o );
+
 #ifdef __cplusplus
 }
 #endif