summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-26 15:17:41 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-26 15:17:41 +0200
commitfec2fca2df568aa059e93d59bcfb63daec686583 (patch)
treef070e53c3969c852c8ef9656e381e19e1c0f0efd /include
parent90f2c44a8dedc53de351d42107a40f56d6184899 (diff)
modifed class_exists function to work with a char* without having to convert it into a std::string
Diffstat (limited to 'include')
-rw-r--r--include/call.h3
-rw-r--r--include/fastcall.h13
2 files changed, 3 insertions, 13 deletions
diff --git a/include/call.h b/include/call.h
index 05c5955..80ef6c9 100644
--- a/include/call.h
+++ b/include/call.h
@@ -15,6 +15,9 @@ namespace Php {
/**
* List of functions that are available for use in PHP
*/
+bool class_exists(const char *classname, size_t size, bool autoload = true);
+bool class_exists(const char *classname, bool autoload = true) { return class_exists(classname, strlen(classname), autoload); }
+bool class_exists(const std::string &classname, bool autoload = true) { return class_exists(classname.c_str(), classname.size(), autoload); }
Value eval(const std::string &phpCode);
/**
diff --git a/include/fastcall.h b/include/fastcall.h
deleted file mode 100644
index a5a8e1c..0000000
--- a/include/fastcall.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * fastcall.h
- *
- * This file holds some PHP functions implementation in C directly.
- *
- */
-
-namespace Php {
-
- bool class_exists(const std::string &classname, bool autoload = true);
-
-}
-