Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
c51d1a77
Commit
c51d1a77
authored
May 20, 2014
by
Martin Szulecki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redo PLIST_WARN_DEPRECATED macro to work with older llvm/clang
parent
993f65b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
10 deletions
+32
-10
Dictionary.h
include/plist/Dictionary.h
+1
-1
plist.h
include/plist/plist.h
+31
-9
No files found.
include/plist/Dictionary.h
View file @
c51d1a77
...
...
@@ -47,7 +47,7 @@ public :
iterator
End
();
iterator
Find
(
const
std
::
string
&
key
);
iterator
Set
(
const
std
::
string
&
key
,
Node
*
node
);
DEPRECATED
(
"use Set() instead"
)
iterator
Insert
(
const
std
::
string
&
key
,
Node
*
node
);
PLIST_WARN_
DEPRECATED
(
"use Set() instead"
)
iterator
Insert
(
const
std
::
string
&
key
,
Node
*
node
);
void
Remove
(
Node
*
node
);
void
Remove
(
const
std
::
string
&
key
);
std
::
string
GetNodeKey
(
Node
*
key
);
...
...
include/plist/plist.h
View file @
c51d1a77
...
...
@@ -40,21 +40,43 @@ extern "C"
typedef
unsigned
__int64
uint64_t
;
#ifdef plist_EXPORTS
#define PLIST_API __declspec( dllexport )
#define PLIST_API __declspec( dllexport )
#else
#define PLIST_API __declspec( dllimport )
#define PLIST_API __declspec( dllimport )
#endif
#define DEPRECATED(x) __declspec(deprecated(x))
#else
#include <stdint.h>
#define PLIST_API
#ifdef __GNUC__
#define DEPRECATED(x) __attribute__((deprecated(x)))
#endif
#ifdef __llvm__
#if defined(__has_extension)
#if (__has_extension(attribute_deprecated_with_message))
#ifndef PLIST_WARN_DEPRECATED
#define PLIST_WARN_DEPRECATED(x) __attribute__((deprecated(x)))
#endif
#else
#ifndef PLIST_WARN_DEPRECATED
#define PLIST_WARN_DEPRECATED(x) __attribute__((deprecated))
#endif
#endif
#else
#ifndef PLIST_WARN_DEPRECATED
#define PLIST_WARN_DEPRECATED(x) __attribute__((deprecated))
#endif
#endif
#elif (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 5)))
#ifndef PLIST_WARN_DEPRECATED
#define PLIST_WARN_DEPRECATED(x) __attribute__((deprecated(x)))
#endif
#elif defined(_MSC_VER)
#ifndef PLIST_WARN_DEPRECATED
#define PLIST_WARN_DEPRECATED(x) __declspec(deprecated(x))
#endif
#else
#define DEPRECATED(x)
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#endif
#define PLIST_WARN_DEPRECATED(x)
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#endif
#include <sys/types.h>
...
...
@@ -339,7 +361,7 @@ extern "C"
* @param item the new item to insert
* @param key The identifier of the item to insert.
*/
DEPRECATED
(
"use plist_dict_set_item instead"
)
PLIST_API
void
plist_dict_insert_item
(
plist_t
node
,
const
char
*
key
,
plist_t
item
);
PLIST_WARN_
DEPRECATED
(
"use plist_dict_set_item instead"
)
PLIST_API
void
plist_dict_insert_item
(
plist_t
node
,
const
char
*
key
,
plist_t
item
);
/**
* Remove an existing position in a #PLIST_DICT node.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment