First round of director mods

- Removed asserts
- The unused __DIRECTOR__ base class default constructor removed. I've used the conventional approach of having no default constructor rather than a private one (declaring it private doesn't serve any useful purpose when this constructor is not wanted).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5132 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-09-20 15:11:38 +00:00
commit a7933a75b0
7 changed files with 0 additions and 29 deletions

View file

@ -11,7 +11,6 @@
%insert(runtime) %{
#include <assert.h>
#ifdef __cplusplus
#include <string>
@ -61,11 +60,6 @@ private:
#endif
public:
/* the default constructor should not be called */
__DIRECTOR__() {
assert(0);
}
/* wrap a ocaml object, optionally taking ownership */
__DIRECTOR__(CAML_VALUE self, int disown): _self(self), _disown(disown) {
register_global_root(&_self);
@ -125,7 +119,6 @@ public:
/* acquire ownership of the wrapped ocaml object (the sense of "disown"
* is from ocaml) */
void __disown() const {
assert(_self);
if (!_disown) {
_disown=1;
callback(*caml_named_value("caml_obj_disown"),_self);