97 lines
2.3 KiB
Diff
97 lines
2.3 KiB
Diff
--- a/include/plist/plist.h
|
|
+++ b/include/plist/plist.h
|
|
@@ -29,6 +29,20 @@
|
|
{
|
|
#endif
|
|
|
|
+#ifdef _WIN32
|
|
+ #ifdef DLL_EXPORT
|
|
+ #define PLIST_API __declspec( dllexport )
|
|
+ #else
|
|
+ #define PLIST_API
|
|
+ #endif
|
|
+#else
|
|
+ #ifdef HAVE_FVISIBILITY
|
|
+ #define PLIST_API __attribute__((visibility("default")))
|
|
+ #else
|
|
+ #define PLIST_API
|
|
+ #endif
|
|
+#endif
|
|
+
|
|
#if _MSC_VER && _MSC_VER < 1700
|
|
typedef __int8 int8_t;
|
|
typedef __int16 int16_t;
|
|
@@ -492,7 +506,7 @@
|
|
*
|
|
* @param node the parent (NULL if node is root)
|
|
*/
|
|
- plist_t plist_get_parent(plist_t node);
|
|
+ PLIST_API plist_t plist_get_parent(plist_t node);
|
|
|
|
/**
|
|
* Get the #plist_type of a node.
|
|
@@ -500,7 +514,7 @@
|
|
* @param node the node
|
|
* @return the type of the node
|
|
*/
|
|
- plist_type plist_get_node_type(plist_t node);
|
|
+ PLIST_API plist_type plist_get_node_type(plist_t node);
|
|
|
|
/**
|
|
* Get the value of a #PLIST_KEY node.
|
|
@@ -511,7 +525,7 @@
|
|
* caller is responsible for freeing it.
|
|
* @note Use plist_mem_free() to free the allocated memory.
|
|
*/
|
|
- void plist_get_key_val(plist_t node, char **val);
|
|
+ PLIST_API void plist_get_key_val(plist_t node, char **val);
|
|
|
|
/**
|
|
* Get the value of a #PLIST_STRING node.
|
|
diff -Naur libplist-2.3.0-orig/src/plist.c libplist-2.3.0/src/plist.c
|
|
--- libplist-2.3.0-orig/src/plist.c 2023-05-13 08:39:03.008566000 +0100
|
|
+++ libplist-2.3.0/src/plist.c 2023-05-13 08:41:41.290897200 +0100
|
|
@@ -1004,12 +1004,12 @@
|
|
}
|
|
}
|
|
|
|
-PLIST_API plist_t plist_get_parent(plist_t node)
|
|
+plist_t plist_get_parent(plist_t node)
|
|
{
|
|
return node ? (plist_t) ((node_t) node)->parent : NULL;
|
|
}
|
|
|
|
-PLIST_API plist_type plist_get_node_type(plist_t node)
|
|
+plist_type plist_get_node_type(plist_t node)
|
|
{
|
|
if (node)
|
|
{
|
|
@@ -1020,7 +1020,7 @@
|
|
return PLIST_NONE;
|
|
}
|
|
|
|
-PLIST_API void plist_get_key_val(plist_t node, char **val)
|
|
+void plist_get_key_val(plist_t node, char **val)
|
|
{
|
|
if (!node || !val)
|
|
return;
|
|
--- a/src/plist.h
|
|
+++ b/src/plist.h
|
|
@@ -37,16 +37,6 @@
|
|
#pragma warning(disable:4244)
|
|
#endif
|
|
|
|
-#ifdef WIN32
|
|
- #define PLIST_API __declspec( dllexport )
|
|
-#else
|
|
- #ifdef HAVE_FVISIBILITY
|
|
- #define PLIST_API __attribute__((visibility("default")))
|
|
- #else
|
|
- #define PLIST_API
|
|
- #endif
|
|
-#endif
|
|
-
|
|
struct plist_data_s
|
|
{
|
|
union
|