vendor/rust/rust/templates/CxxStandaloneClassDefinitions.rusttpl in gecoder-0.6.0 vs vendor/rust/rust/templates/CxxStandaloneClassDefinitions.rusttpl in gecoder-0.6.1
- old
+ new
@@ -1,12 +1,26 @@
//-*-c++-*-
T!class_ptrmap! !class_ptrmap!;
static void !class_varname!_free(void *p) {
+ !class_map_free_function!(p);
+ delete (!c_class_name!*)p;
+}
+
+static void !class_varname!_free_map_entry(void *p) {
+#ifdef DEBUG
+ fprintf(stderr, "rust: Freeing %p (!class_varname!) \\n", p);
+#endif
+
T!class_ptrmap!::iterator it, eend = !class_ptrmap!.end();
for(it = !class_ptrmap!.begin(); it != eend; it++)
if ( (*it).second == (!c_class_name!*)p ) {
!class_ptrmap!.erase(it); break;
}
- delete (!c_class_name!*)p;
+}
+
+static void !class_varname!_mark(void *p) {
+#ifdef DEBUG
+ fprintf(stderr, "rust: Marking %p (!class_varname!) \\n", p);
+#endif
}