[Gridflow-cvs] [svn] commit: r3320 - /trunk/base/main.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Mar 28 11:41:12 EDT 2008


Author: matju
Date: Fri Mar 28 11:41:12 2008
New Revision: 3320

Log:
don't import std

Modified:
    trunk/base/main.c

Modified: trunk/base/main.c
==============================================================================
--- trunk/base/main.c (original)
+++ trunk/base/main.c Fri Mar 28 11:41:12 2008
@@ -37,7 +37,7 @@
 /* for exception-handling in 0.9.0 */
 #include <exception>
 #include <execinfo.h>
-using namespace std;
+//using namespace std;
 
 #include "grid.h.fcs"
 
@@ -311,8 +311,7 @@
 }
 
 NumberTypeE NumberTypeE_find (Ruby sym) {
-	if (TYPE(sym)!=T_SYMBOL) RAISE("expected symbol (not %s)",
-		rb_str_ptr(rb_inspect(rb_obj_class(sym))));
+	if (TYPE(sym)!=T_SYMBOL) RAISE("expected symbol (not %s)", rb_str_ptr(rb_inspect(rb_obj_class(sym))));
 	Ruby nt_dict = rb_ivar_get(mGridFlow,SI(@number_type_dict));
 	Ruby v = rb_hash_aref(nt_dict,sym);
 	if (v!=Qnil) return FIX2PTR(NumberType,v)->index;
@@ -401,7 +400,7 @@
 		rb_define_class_under(mGridFlow, fc->name, super) :
 		rb_funcall(mGridFlow,SI(const_get),1,rb_str_new2(fc->name));
 	define_many_methods(rself,fc->methodsn,fc->methods);
-	rb_ivar_set(rself,SI(@allocator),PTR2FIX((void*)(fc->allocator))); //#!@$??
+	rb_ivar_set(rself,SI(@allocator),PTR2FIX((void*)(fc->allocator)));
 	if (fc->startup) fc->startup(rself);
 	return Qnil;
 }
@@ -526,8 +525,8 @@
 // Ruby's entrypoint.
 void Init_gridflow () {
         srandom(rdtsc());
-	//set_terminate(__gnu_cxx::__verbose_terminate_handler);
-	set_terminate(blargh);
+	//std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+	std::set_terminate(blargh);
 
 #define FOO(_sym_,_name_) bsym._sym_ = ID2SYM(rb_intern(_name_));
 BUILTIN_SYMBOLS(FOO)



More information about the Gridflow-cvs mailing list