Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWIG: Add smart pointer support, add 8193.36 missing templates. #1714

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

jhett12321
Copy link
Contributor

Adds missing template types so the full types are accessible from SWIG wrappers.

@@ -365,20 +364,20 @@
-  public SWIGTYPE_p_CExoArrayListT_CLastUpdateObject_p_t m_lstActiveObjectsLastUpdate {
+  public CExoArrayListCLastUpdateObjectPtr m_lstActiveObjectsLastUpdate {
     set {
-      NWNXLibPINVOKE.CNWSPlayer_m_lstActiveObjectsLastUpdate_set(swigCPtr, SWIGTYPE_p_CExoArrayListT_CLastUpdateObject_p_t.getCPtr(value));
+      NWNXLibPINVOKE.CNWSPlayer_m_lstActiveObjectsLastUpdate_set(swigCPtr, CExoArrayListCLastUpdateObjectPtr.getCPtr(value));
     } 
     get {
       global::System.IntPtr cPtr = NWNXLibPINVOKE.CNWSPlayer_m_lstActiveObjectsLastUpdate_get(swigCPtr);
-      SWIGTYPE_p_CExoArrayListT_CLastUpdateObject_p_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_CExoArrayListT_CLastUpdateObject_p_t(cPtr, false);
+      CExoArrayListCLastUpdateObjectPtr ret = (cPtr == global::System.IntPtr.Zero) ? null : new CExoArrayListCLastUpdateObjectPtr(cPtr, false);
       return ret;
     } 
   }
 
-  public SWIGTYPE_p_CExoArrayListT_CLastUpdatePartyObject_p_t m_lstActivePartyObjectsLastUpdate {
+  public CExoArrayListCLastUpdatePartyObjectPtr m_lstActivePartyObjectsLastUpdate {
     set {
-      NWNXLibPINVOKE.CNWSPlayer_m_lstActivePartyObjectsLastUpdate_set(swigCPtr, SWIGTYPE_p_CExoArrayListT_CLastUpdatePartyObject_p_t.getCPtr(value));
+      NWNXLibPINVOKE.CNWSPlayer_m_lstActivePartyObjectsLastUpdate_set(swigCPtr, CExoArrayListCLastUpdatePartyObjectPtr.getCPtr(value));
     } 
     get {
       global::System.IntPtr cPtr = NWNXLibPINVOKE.CNWSPlayer_m_lstActivePartyObjectsLastUpdate_get(swigCPtr);
-      SWIGTYPE_p_CExoArrayListT_CLastUpdatePartyObject_p_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_CExoArrayListT_CLastUpdatePartyObject_p_t(cPtr, false);
+      CExoArrayListCLastUpdatePartyObjectPtr ret = (cPtr == global::System.IntPtr.Zero) ? null : new CExoArrayListCLastUpdatePartyObjectPtr(cPtr, false);
       return ret;
     } 

Also adds support for smart pointer usages:

@@ -2161,6 +2163,7 @@
   }
 
-  public SWIGTYPE_p_std__shared_ptrT_NWSQLite__Database_t GetObjectSqlDatabase() {
-    SWIGTYPE_p_std__shared_ptrT_NWSQLite__Database_t ret = new SWIGTYPE_p_std__shared_ptrT_NWSQLite__Database_t(NWNXLibPINVOKE.CNWSObject_GetObjectSqlDatabase(swigCPtr), true);
+  public Database GetObjectSqlDatabase() {
+    global::System.IntPtr cPtr = NWNXLibPINVOKE.CNWSObject_GetObjectSqlDatabase(swigCPtr);
+    Database ret = (cPtr == global::System.IntPtr.Zero) ? null : new Database(cPtr, true);
     return ret;
   }

@mtijanic
Copy link
Member

All SWIG-only changes from you get auto merged :)

@mtijanic mtijanic merged commit 0e77a56 into nwnxee:master Dec 10, 2023
@jhett12321 jhett12321 deleted the swig-smart-ptr-templates branch December 10, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants