summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-02-28 16:06:23 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-02-28 16:06:23 +0100
commit73945a9cb2b096a5379d17c028bda102b87aedce (patch)
treee261496b4127a5e00bfc88841567ab6fcaefbe0f /src
parent13fe1d48fa4782dc65f974bbc1cec5e2e5e8d158 (diff)
various fixes to make the classes example functional again
Diffstat (limited to 'src')
-rw-r--r--src/classbase.cpp2
-rw-r--r--src/member.h2
-rw-r--r--src/method.h4
-rw-r--r--src/modifiers.cpp1
4 files changed, 7 insertions, 2 deletions
diff --git a/src/classbase.cpp b/src/classbase.cpp
index da705b6..38972f5 100644
--- a/src/classbase.cpp
+++ b/src/classbase.cpp
@@ -198,7 +198,7 @@ void ClassBase::initialize()
#endif
// set access types flags for class
- _entry->ce_flags = flags;
+ _entry->ce_flags = _flags;
// declare all member variables
for (auto &member : _members) member->initialize(_entry);
diff --git a/src/member.h b/src/member.h
index a1bce52..3ccdfad 100644
--- a/src/member.h
+++ b/src/member.h
@@ -30,7 +30,7 @@ public:
/**
* Destructor
*/
- virtual ~Member();
+ virtual ~Member() {}
/**
* Initialize the member
diff --git a/src/method.h b/src/method.h
index cc9f973..6a91068 100644
--- a/src/method.h
+++ b/src/method.h
@@ -46,6 +46,10 @@ public:
*/
void initialize(struct _zend_function_entry *entry, const std::string &classname)
{
+ // fix the flags, if neither public, private and protected is set, we use public,
+ // (this solves php warnings if only "final" or only "abstract" is set
+ if ((_flags & (Public|Private|Protected)) == 0) _flags |= Public;
+
// call base
Callable::initialize(entry, classname.c_str(), _flags);
}
diff --git a/src/modifiers.cpp b/src/modifiers.cpp
index 946b910..c987b8a 100644
--- a/src/modifiers.cpp
+++ b/src/modifiers.cpp
@@ -7,6 +7,7 @@
* @author Martijn Otto
* @copyright 2014 Copernica BV
*/
+#include "includes.h"
/**
* Set up namespace