mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 01:01:35 +01:00
Add wuffs_foo__bar__initialize methods
This commit is contained in:
1 parent
10ead58e2e
commit
8794a586ac
10 files changed
+348
-103
No files matched your search
@@ -14,8 +14,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
static inline void wuffs_base__ignore_check_wuffs_version_status(
|
||||
wuffs_base__status z) {}
|
||||
static inline void //
|
||||
wuffs_base__ignore_status(wuffs_base__status z) {}
|
||||
|
||||
// WUFFS_BASE__MAGIC is a magic number to check that initializers are called.
|
||||
// It's not foolproof, given C doesn't automatically zero memory before use,
|
||||
@@ -438,6 +438,7 @@ wuffs_base__acknowledge_potentially_unused_functions__core_private()
|
||||
|
||||
static inline void
|
||||
wuffs_base__acknowledge_potentially_unused_functions__core_private() {
|
||||
(void)(wuffs_base__ignore_status);
|
||||
(void)(wuffs_base__load_u16be);
|
||||
(void)(wuffs_base__load_u16le);
|
||||
(void)(wuffs_base__load_u24be);
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
#define WUFFS_BASE__WARN_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
// Flags for wuffs_foo__bar__initialize functions.
|
||||
|
||||
// WUFFS_INITIALIZE__ALREADY_ZEROED means that the "self" receiver struct value
|
||||
// has already been set to all zeroes.
|
||||
#define WUFFS_INITIALIZE__ALREADY_ZEROED ((uint32_t)0x00000001)
|
||||
|
||||
// --------
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
// Wuffs, if a function g returns empty, you can say "y = g()".
|
||||
|
||||
Reference in new issue
Block a user