Revision: 10027 http://pure-data.svn.sourceforge.net/pure-data/?rev=10027&view=rev Author: eighthave Date: 2008-06-18 09:32:57 -0700 (Wed, 18 Jun 2008)
Log Message: ----------- - fixed crasher bug when loading import after import has been loaded and freed
- added single quotes around lib name when posting to match the libdir loader
Modified Paths: -------------- branches/pd-extended/v0-40/pd/src/import.c
Modified: branches/pd-extended/v0-40/pd/src/import.c =================================================================== --- branches/pd-extended/v0-40/pd/src/import.c 2008-06-18 15:58:57 UTC (rev 10026) +++ branches/pd-extended/v0-40/pd/src/import.c 2008-06-18 16:32:57 UTC (rev 10027) @@ -72,19 +72,19 @@ while (argc--) { switch (argv->a_type) { case A_FLOAT: - pd_error(x, "[import] ERROR: floats not supported: %f", + pd_error(x, "[import] ERROR: floats not supported: '%f'", atom_getfloat(argv)); break; case A_SYMBOL: library_name = atom_getsymbol(argv); post("loading %s", library_name->s_name); if (!load_library(x,library_name->s_name)) - pd_error(x, "[import]: ERROR: can't load library in %s", + pd_error(x, "[import]: ERROR: can't load library in '%s'", library_name->s_name); else { loaded_libs = namelist_append(loaded_libs, library_name->s_name, 0); - post("[import] loaded library: %s",library_name->s_name); + post("[import] loaded library: '%s'", library_name->s_name); } break; default: @@ -149,7 +149,10 @@ { import_instance_count--; if(import_instance_count == 0) + { namelist_free(loaded_libs); + loaded_libs = NULL; + } /* TODO: perhaps this should remove any libs that this instance had added to * the namespace */ }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.