rev 274 - trunk/src
SVN User <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bcollins
Date: 2004-04-04 11:09:32 -0400 (Sun, 04 Apr 2004)
New Revision: 274
Modified:
trunk/src/object.c
trunk/src/object.h
Log:
Use assert.h instead of built-in assert(). Win32 supports ANSI assert()
and NDEBUG.
Modified: trunk/src/object.c
===================================================================
--- trunk/src/object.c 2004-04-04 15:08:52 UTC (rev 273)
+++ trunk/src/object.c 2004-04-04 15:09:32 UTC (rev 274)
@@ -67,15 +67,6 @@
#include "interp.h"
#include "dict.h"
-#ifdef ASSERT_
-void assert(int cond){
- if(!cond){
- printf("Assertion failed\n");
- pr_exit(1);
- }
-}
-#endif
-
obj_p obj_list_root;
DECLARE_PR_LOCK(object_list_lock);
pr_services_t dll_services;
Modified: trunk/src/object.h
===================================================================
--- trunk/src/object.h 2004-04-04 15:08:52 UTC (rev 273)
+++ trunk/src/object.h 2004-04-04 15:09:32 UTC (rev 274)
@@ -56,6 +56,10 @@
#ifndef OBJECT_H
#define OBJECT_H
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <prothon/prothon_dll.h>
#include "lock.h"
#include "prlist.h"
@@ -74,14 +78,9 @@
extern obj_p obj_list_root;
extern pr_lock_t object_list_lock;
-#define ASSERT_
+// #define NDEBUG
+#include <assert.h>
-#ifdef ASSERT_
-void assert(int cond);
-#else
-#define assert(x)
-#endif
-
obj_p list_append_no_lock(obj_p list_obj, obj_p item);