Skip to content

Commit ccde962

Browse files
committed
Deprecated raw pointer access (will be removed in 1.0.0)
1 parent 5d61ffa commit ccde962

File tree

7 files changed

+9
-4
lines changed

7 files changed

+9
-4
lines changed

CHANGELOG

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
protobluff-0.x.x
22

3-
This release is not finished yet, packed fields are implemented in the
4-
message library but not in core. This is going to be fixed in a few days.
3+
In progress.
54

65
Runtime:
76

7+
* Deprecated raw pointer access (will be removed in 1.0.0)
88
* Fixed invalid reads reported when compiling with -fsanitize
99
* Fixed incorrectly reported position in pb_cursor_seek()
1010
* Added support for packed fields

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ AC_CONFIG_FILES([
223223
# Compiler flags
224224
CFLAGS+=" -std=c99"
225225
CXXFLAGS+=" -std=c++98"
226-
CPPFLAGS+=" -Wall -Wno-address -march=native"
226+
CPPFLAGS+=" -Wall -Wno-deprecated-declarations -Wno-address -march=native"
227227

228228
# Output result
229229
AC_OUTPUT

include/protobluff/message/cursor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ PB_EXPORT pb_error_t
103103
pb_cursor_erase(
104104
pb_cursor_t *cursor); /* Cursor */
105105

106+
PB_DEPRECATED
106107
PB_EXPORT void *
107108
pb_cursor_raw(
108109
pb_cursor_t *cursor); /* Cursor */

include/protobluff/message/field.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ PB_EXPORT pb_error_t
9595
pb_field_clear(
9696
pb_field_t *field); /* Field */
9797

98+
PB_DEPRECATED
9899
PB_EXPORT void *
99100
pb_field_raw(
100101
pb_field_t *field); /* Field */

include/protobluff/message/message.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ PB_EXPORT pb_error_t
125125
pb_message_clear(
126126
pb_message_t *message); /* Message */
127127

128+
PB_DEPRECATED
128129
PB_EXPORT void *
129130
pb_message_raw(
130131
pb_message_t *message, /* Message */

include/protobluff/message/nested.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pb_message_nested_erase(
6868
const pb_tag_t tags[], /* Tags */
6969
size_t size); /* Tag count */
7070

71+
PB_DEPRECATED
7172
PB_EXPORT void *
7273
pb_message_nested_raw(
7374
pb_message_t *message, /* Message */

src/generator/field.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ namespace protobluff {
618618
case FieldDescriptor::TYPE_DOUBLE:
619619
printer->Print(variables_,
620620
"/* `signature` : raw */\n"
621+
"PB_DEPRECATED\n"
621622
"PB_INLINE `define.type` *\n"
622623
"`define.symbol`_raw_`define.name`(\n"
623624
" pb_message_t *message) {\n"
@@ -838,7 +839,7 @@ namespace protobluff {
838839
case FieldDescriptor::TYPE_DOUBLE:
839840
printer->Print(variables,
840841
"/* `signature` : raw */\n"
841-
"`define.deprecated`"
842+
"PB_DEPRECATED\n"
842843
"PB_INLINE `define.type` *\n"
843844
"`define.symbol`_raw_`define.name`(\n"
844845
" pb_message_t *message) {\n"

0 commit comments

Comments
 (0)