Commit graph

19,997 commits

Author SHA1 Message Date
Nihal
f054f76544 Bug Fix Director upcall functions to return object pointers
- Refactor php.swg to adhere to checkstyle
2017-09-03 10:29:18 +05:30
Nihal
38f282d847 Fix class-constant bug.
- zend_declare_class_constant ends up having "" values.
2017-09-02 11:02:10 +05:30
Nihal
6c991d6c67 Remove abstractness check in PHP7 test cases 2017-09-01 00:44:57 +05:30
Nihal
e11b4711a7 Remove abstarct on Directed methods to allow dispatch pass through 2017-09-01 00:21:17 +05:30
Nihal
a8db1e4aa6 Remove all checks of ':' on name attribute.
- Remove use of getWrapperMethodName
2017-09-01 00:19:56 +05:30
Nihal
0343a01a8c Refactor checks/use of ':' with name attribute 2017-08-28 13:06:07 +05:30
Nihal
e4f56a8ed5 Fix operator_overload test-case
- Friend function is not under class methods.
- Also fix friend function overloading.
2017-08-28 12:22:28 +05:30
Nihal
9c40bbdb85 Refactor SWIG_SetZval to simplify the arguments. Solve constructor rename bug
- Refactor SWIG_SetZval.
- Fix the Renamed constructor - turn into static factory method bug.

Conflicts:
	Source/Modules/php.cxx
2017-08-28 11:22:51 +05:30
Nihal
aa180f2c4d Refactor code and adhere to codestyle/checkstyle.
- Remove noproxy processing code.
2017-08-28 04:07:40 +05:30
Olly Betts
88c2e96444 Merge remote-tracking branch 'nihaln/checkout_code' into gsoc2017-php7-classes-via-c-api
Fixes #1072
2017-08-20 09:03:48 +12:00
Nihal
4252b31f8f Refactor code to rename class entry variables and ConvertPtr to work with wrapped objects.
- Rename class entry variables to SWIGTYPE_class_ce
- Refactor factory code to use SWIGTYPE_class_ce to create objects
- Refactor ConvertPtr to work of wrapped class objects.
2017-08-20 01:54:07 +05:30
Nihal
9fea6fc5ac Refactor code and solve few test cases.
- Change the need of runtime check on old or new flow at wrapper generation time.
- Change the check on add ZEND_ACC_ABSTRACT to GetFlag(n, "abstract") && Swig_directorclass(Swig_methodclass(n))
  - workaround to solve abstract testcases at the moment.
- Remove redundant code in class handler for getting namespaces (Not the correct approact) and use of zend_register_class_alias_ex.
- Refactor choosing of class name to use sym:name by default.
2017-08-18 09:02:47 +05:30
Nihal
a687b020e2 Refactor code and change change enum_scope_template test to use class enums. Fix few test cases.
- Change enum_scope_template test to use class enums.
- Move the conversion of void* of ptr in swig wrapper to class pointer to Lib files.
- Synchronize between old and new flow. Old flow to accept newly created objects,
with the use of a new property SWIG_classWrapper to newly created objects.
- ZEND_BEGIN_ARG_INFO_EX to hold exact number of arguments required.
- Fix the constructor overloading bug in the in-house Swig_class_overload_dispatch function
- Add helper function to check if the class is wrapped.
- Add ZEND_ACC_ABSTRACT to virtual functions to make the class abstract.
- Change how wname is selected for staticmemberfn.
- Helper function to get names without namespace getNameWithoutNamespace.
- Fix bugs on class entry level at class handler.
  - Move all entry level code to class handler from class decleration.
  - Checking if base.item is null before using it.
  - Check if the parent class is wrapped before using its class entry.
2017-08-18 08:54:05 +05:30
Nihal
8252f37ae8 Refactor code and introduce some functionalities. Also Fix some testcases.
Code Refactor
- Refactor code for return type of SWIGTYPE
- Workaround for Namespaced classes.
- Refactor code of SWIG_SetZval to take care of objects in class constructor.
- Introduce SWIG_generalize_object to generalize each object to swig object wrapper.
- Catch feature:immutable instead of feature:warnfilter - 462 for missing setter.
- Refactor code to create PHP objects for all instances of value, reference and pointer return types of C++ objects.
  This applies for conversion operators too.
- Introduce getAccessMode to get the Access Mode of a method for generating Wrapper.
- Refactor free_object creation to include need_free condition. This is to check if there is a need to free.
  Example where it isn't required to free - (Virtual Protected Destructors).
- Support for feature:exceptionclass. Extends class Exception.
- Improve condition check in Director class constructor to distinguish between, extended class creation or not.
  Swig::Director::swig_is_overridden_method is used.
2017-08-13 17:28:08 +12:00
Nihal
ae71fc2266 Refactor Code and Support phpinterfaces, factory dispatch
- rewire return of type SWIGTYPE
- {NULL, NULL, NULL} to ZEND_FE_END
- feature:warnfilter - 462 of missing setter
- refactor code of return type (replaced)
- support conversion_operator
2017-08-13 17:28:08 +12:00
Nihal
da53351cac Refactor code and introduce some functionalities.
Code Refactor
- Refactor code for return type of SWIGTYPE
- Workaround for Namespaced classes.
- Refactor code of SWIG_SetZval to take care of objects in class constructor.
- Introduce SWIG_generalize_object to generalize each object to swig object wrapper.
- Catch feature:immutable instead of feature:warnfilter - 462 for missing setter.
- Refactor code to create PHP objects for all instances of value, reference and pointer return types of C++ objects.
- Introduce getAccessMode to get the Access Mode of a method for generating Wrapper.
- Refactor free_object creation to include need_free condition. This is to check if there is a need to free. (Virtual Protected Destructors)
- Support for feature:exceptionclass. Extends class Exception.
- Improve condition check in Director class constructor to distinguish between, extended class creation or not.
  Swig::Director::swig_is_overridden_method is used.
2017-08-12 10:11:47 +05:30
Nihal
a930743932 Refactor Code and Support phpinterfaces, factory dispatch
- rewire return of type SWIGTYPE
- {NULL, NULL, NULL} to ZEND_FE_END
- feature:warnfilter - 462 of missing setter
- refactor code of return type (replaced)
- support conversion_operator
2017-08-04 23:13:19 +05:30
Olly Betts
25397f0ab9 Merge remote-tracking branch 'nihaln/changed_code' into gsoc2017-php7-classes-via-c-api 2017-08-01 19:02:25 +12:00
Nihal
67fb198b73 SWIG Director Support with Class Structure. Refactor Code to support rename.
Refactor Code
- Support Director Classes.
- %rename support of class names and method names.
- Creation and destruction methods after inline code.
- Test case check::function return true. - Needs Fixup
2017-08-01 11:01:15 +05:30
Nihal
f6acfc2bbb SWIG Director Support with Class Structure. Refactor Code to support rename.
Refactor Code - Support Director Support
	      - %rename support of class names and method names.
              - Creation and destruction methods after inline code.
2017-08-01 10:26:41 +05:30
Nihal
2e5f0fac52 Add class method check in Test Cases.
Currently they check flat functions at check::functions()
2017-07-27 06:51:00 +05:30
Nihal
6b8aae188f Refactor Code.
- Support different return types of pointers. - Fixup
- Support the rename functionality in class names.
- Redirect the resource destructor to the class desctructor if its a class resource - Object pointers.
2017-07-23 09:54:23 +05:30
Nihal
4c55919975 Refactor Code to use swig_object_wrapper for wrapping classes.
And use void * to store class pointers.
2017-07-19 22:52:46 +05:30
Nihal
b5c408ddc1 Refactor Code to use swig_object_wrapper for wrapping classes.
And use void * to store class pointers.
2017-07-19 20:49:47 +05:30
Nihal
05c25a71d6 Remove globals check in the php test-suite.
It was done mainly to check in the "flat" function structure.
Not needed since the class structure is adopted now.
2017-07-19 20:49:43 +05:30
Nihal
b38e6d9584 Remove SWIG_Get_Type function usage in class constants.
Add class constant typemaps. (classconsttab)
2017-07-19 20:49:40 +05:30
Nihal
a71b349204 Add overload Support.
Use in house SWIG_overload_dispatch for class overloaded methods.
2017-07-19 20:49:37 +05:30
Nihal
290198495f Support Disown functionality.
Creating newobject variable under struct which stores this pointer.
Using that to implement Disown.
2017-07-19 20:49:33 +05:30
Nihal
4458040975 Refactor Code: Change Approach to emit necessary code for pointer params.
Use in typemap.
2017-07-19 20:49:26 +05:30
Nihal
c6cfad2aab Remove SWIG_Get_Type in magic getter and setter methods.
Use respective getter and setter methods.
2017-07-19 20:49:22 +05:30
Nihal
de31666c3a Fixup: Remove TRMS Stuff (Not used in PHP7).
Remove Cmp of class_name with NULL.
Reuse code to find "_get" (getters) methods of member variables.
2017-07-19 20:48:50 +05:30
Nihal
58aff09ebe Add magic methods support (__get, __set, and __isset) inherently to the extensions.
This to to maintain compatibility and consistency.
2017-07-19 20:48:46 +05:30
Nihal
42f012b2d1 Bug Fix of double freeing. It used to create a new object for all get commands of class/struct pointers.
Now creating only if newobject is lit, or else creating a basic zend object to return to user.
2017-07-19 20:48:27 +05:30
Nihal
9addd37640 Use pre-exisiting function is_class to check a valid class/struct defenition. 2017-07-19 20:48:24 +05:30
Nihal
ce04574059 Add support to access static member variables in different way.
This is to keep compatibility and consistency with the older way.
Shape::nshapes static variable's setter and getter methods can be
accessed by Shape::nshapes(10),Shape::nshapes() respectively.
2017-07-19 20:48:19 +05:30
Nihal
4de2f257f9 Using wname variable for function name generated in .cxx or .c wrapper.
This is to ensure compatibility and consistency
2017-07-19 20:48:15 +05:30
Nihal
5e001d5288 Add class constants support to access class enums and class constants.
"flat" constants changed to class constatns.
Example: Foo_IMPULSE -> Foo::IMPULSE
2017-07-19 20:48:01 +05:30
Nihal
11e2f53840 Object Structure approach Code
Takes care of simple class wrapping with pointers, enum, values, variables, and inheritance.
2017-07-19 20:47:53 +05:30
William S Fulton
06c275935b Add readme info for Java container wrappers 2017-07-18 07:17:03 +01:00
William S Fulton
df899cfef1 Merge branch 'fflexo-javalist'
* fflexo-javalist:
  Java std::vector minor improvement
  Fix Java container tests for change in vector constructor declaration
  Add in missing Java std::list listIterator index range checking
  Minor correction in C# std::list doNextIndex
  Add missing typedefs to Java std::vector
  Consistent destructor declarations
  Remove Java std::list::max_size
  Java std::list std::vector - test addAll and subList
  Handle length_error exceptions in Java std::vector::reserve
  Remove Java std::list::assign
  Additional add/remove methods added to Java std::list wrappers
  More efficient add implementation for Java std::list
  Java std::vector std::list: add missing exception handling
  Java std::vector std::list enhancements
  Modify std::list declarations to match the C++ standard
  Fix removing elements from std::list Java wrapper
  Improve Java std::list std::vector runtime tests and wrap std::list::clear
  Wrap std::list::empty as isEmpty in Java
  javabase typemap improvement for std::list
  Java std::list - fully qualifiy Java class name to avoid potential name ambiguity
  cosmetics
  Remove redundant code
  Java std::list rework to be consistent with std::vector wrappers
  li_std_list testcase not working for most languages
  re-enabled li_std_list test
  Switched from autobox to jboxtype per #842
  Document autobox.i
  Made the conversion from long->int for size_type mapping onto Java interfaces cleaner.
  Be consistent in semantics of %extend on std::list::iterator
  Comment on consideration of making iterator non-static.
  Java style fix: iterator->Iterator
  Moving iterator functionality into nested Java class now.
  Removed typedef from li_std_list test as it's not expected to work properly in templated code
  Added a best case workaround for std::list::size_type vs jint problem. There's a bit of commentry added around it too for clarity.
  Drop non-const reference from autobox typemap macro to be consistent.
  just use a forward declaration for C++ iterator types to fix enum errors
  Added enum to li_std_list tests
  Added li_std_list to the Java test-suit makefile
  added more comments in a few places
  Base _runme.java for li_std_list off li_std_vector_runme.java
  Expose more types from li_std_list.i
  Don't expose sort() to avoid adding dependencies on all std::list users
  Target each method specificly for setting modifiers
  Don't expose remove() method from std::list to avoid confusing it with Java's remove() in List
  - added std_list.i implemenatation that extends Java's AbstractSequentialList base class - added autobox.i that provides supporting typemaps for generics in containers
2017-07-17 07:35:13 +01:00
William S Fulton
3501f8b421 Merge branch 'futatuki-ccache-configure-care-for-rename'
* futatuki-ccache-configure-care-for-rename:
  Fix CCache documentation build and uninstall
  Add explicit dependency on header files generated by configure script
  Fix make *clean issue in CCache subdir
2017-07-15 14:23:08 +01:00
William S Fulton
20b72b78b4 Fix CCache documentation build and uninstall 2017-07-15 13:17:50 +01:00
William S Fulton
7be6c10d4a Fix display of documented template types when using the autodoc feature for Python. 2017-07-07 19:35:44 +01:00
William S Fulton
abe53e39a9 Java std::vector minor improvement 2017-06-29 20:19:59 +01:00
William S Fulton
0b390a5473 Fix Java container tests for change in vector constructor declaration 2017-06-29 19:59:19 +01:00
William S Fulton
44cd658a53 Add in missing Java std::list listIterator index range checking 2017-06-29 19:32:34 +01:00
William S Fulton
fccf5c29b4 Minor correction in C# std::list doNextIndex 2017-06-29 15:34:05 +01:00
Nihal
251d25346d Fix OUTPUT Typemap not having return statement bug in PHP wrapper. 2017-06-28 09:47:33 +12:00
Olly Betts
52f9ef7bfc Add entry for previous commit 2017-06-27 16:37:18 +12:00
Nihal
717ef91b90 Remove -noproxy support in the Examples of PHP7 2017-06-27 16:32:44 +12:00