Commit 2cfbd02c authored by Davis King's avatar Davis King

Fixed bug in mex binding API.

parent 03995313
...@@ -188,7 +188,7 @@ namespace dlib ...@@ -188,7 +188,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -258,7 +258,7 @@ namespace dlib ...@@ -258,7 +258,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -340,7 +340,7 @@ namespace dlib ...@@ -340,7 +340,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -425,7 +425,7 @@ namespace dlib ...@@ -425,7 +425,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -512,7 +512,7 @@ namespace dlib ...@@ -512,7 +512,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
T* data; T* data;
...@@ -635,7 +635,7 @@ namespace dlib ...@@ -635,7 +635,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -705,7 +705,7 @@ namespace dlib ...@@ -705,7 +705,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -787,7 +787,7 @@ namespace dlib ...@@ -787,7 +787,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -872,7 +872,7 @@ namespace dlib ...@@ -872,7 +872,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
private: private:
...@@ -939,7 +939,7 @@ namespace dlib ...@@ -939,7 +939,7 @@ namespace dlib
void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); } void _private_set_mxArray ( mxArray* ) { DLIB_CASSERT(false, "This function should never be called."); }
mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); } mxArray* _private_release_mxArray(){DLIB_CASSERT(false, "This function should never be called."); }
void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); } void _private_mark_non_persistent() {DLIB_CASSERT(false, "This function should never be called."); }
bool _private_is_persistent() {DLIB_CASSERT(false, "This function should never be called."); } bool _private_is_persistent() const { return true; }
#endif #endif
long nr ( long nr (
...@@ -1041,7 +1041,7 @@ namespace dlib ...@@ -1041,7 +1041,7 @@ namespace dlib
DLIB_CASSERT(mem == 0,"You can't convert a persistent matlab array to non-persistent."); DLIB_CASSERT(mem == 0,"You can't convert a persistent matlab array to non-persistent.");
make_persistent = false; make_persistent = false;
} }
bool _private_is_persistent() bool _private_is_persistent() const
{ {
return make_persistent; return make_persistent;
} }
...@@ -1167,7 +1167,7 @@ namespace dlib ...@@ -1167,7 +1167,7 @@ namespace dlib
DLIB_CASSERT(mem == 0,"You can't convert a persistent matlab array to non-persistent."); DLIB_CASSERT(mem == 0,"You can't convert a persistent matlab array to non-persistent.");
make_persistent = false; make_persistent = false;
} }
bool _private_is_persistent() bool _private_is_persistent() const
{ {
return make_persistent; return make_persistent;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment