php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
pack.c File Reference
#include "php.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/param.h>
#include "pack.h"
#include "fsock.h"

Go to the source code of this file.

Macros

#define INC_OUTPUTPOS(a, b)
 
#define MACHINE_LITTLE_ENDIAN   1
 

Functions

typedef ZEND_SET_ALIGNED (1, uint16_t unaligned_uint16_t)
 
typedef ZEND_SET_ALIGNED (1, uint32_t unaligned_uint32_t)
 
typedef ZEND_SET_ALIGNED (1, uint64_t unaligned_uint64_t)
 
typedef ZEND_SET_ALIGNED (1, unsigned int unaligned_uint)
 
typedef ZEND_SET_ALIGNED (1, int unaligned_int)
 
 PHP_FUNCTION (pack)
 
 PHP_FUNCTION (unpack)
 
 PHP_MINIT_FUNCTION (pack)
 

Macro Definition Documentation

◆ INC_OUTPUTPOS

#define INC_OUTPUTPOS ( a,
b )
Value:
if ((a) < 0 || ((INT_MAX - outputpos)/((int)b)) < (a)) { \
efree(formatcodes); \
efree(formatargs); \
zend_value_error("Type %c: integer overflow in format string", code); \
RETURN_THROWS(); \
} \
outputpos += (a)*(b);
#define INT_MAX
Definition php.h:237
$obj a
Definition test.php:84

Definition at line 44 of file pack.c.

◆ MACHINE_LITTLE_ENDIAN

#define MACHINE_LITTLE_ENDIAN   1

Definition at line 56 of file pack.c.

Function Documentation

◆ PHP_FUNCTION() [1/2]

PHP_FUNCTION ( pack )

Definition at line 230 of file pack.c.

◆ PHP_FUNCTION() [2/2]

PHP_FUNCTION ( unpack )

Definition at line 706 of file pack.c.

◆ PHP_MINIT_FUNCTION()

PHP_MINIT_FUNCTION ( pack )

Definition at line 1204 of file pack.c.

◆ ZEND_SET_ALIGNED() [1/5]

typedef ZEND_SET_ALIGNED ( 1 ,
int unaligned_int )

◆ ZEND_SET_ALIGNED() [2/5]

typedef ZEND_SET_ALIGNED ( 1 ,
uint16_t unaligned_uint16_t )

◆ ZEND_SET_ALIGNED() [3/5]

typedef ZEND_SET_ALIGNED ( 1 ,
uint32_t unaligned_uint32_t )

◆ ZEND_SET_ALIGNED() [4/5]

typedef ZEND_SET_ALIGNED ( 1 ,
uint64_t unaligned_uint64_t )

◆ ZEND_SET_ALIGNED() [5/5]

typedef ZEND_SET_ALIGNED ( 1 ,
unsigned int unaligned_uint )