PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
crc32.c File Reference
#include "postgres.h"
#include "ltree.h"
#include <ctype.h>
#include "crc32.h"
#include "utils/pg_crc.h"
Include dependency graph for crc32.c:

Go to the source code of this file.

Macros

#define TOLOWER(x)   tolower((unsigned char) (x))
 

Functions

unsigned int ltree_crc32_sz (const char *buf, int size)
 

Macro Definition Documentation

◆ TOLOWER

#define TOLOWER (   x)    tolower((unsigned char) (x))

Definition at line 15 of file crc32.c.

Function Documentation

◆ ltree_crc32_sz()

unsigned int ltree_crc32_sz ( const char *  buf,
int  size 
)

Definition at line 24 of file crc32.c.

25 {
26  pg_crc32 crc;
27  const char *p = buf;
28 
30  while (size > 0)
31  {
32  char c = (char) TOLOWER(*p);
33 
35  size--;
36  p++;
37  }
39  return (unsigned int) crc;
40 }
#define TOLOWER(x)
Definition: crc32.c:15
return crc
uint32 pg_crc32
Definition: pg_crc.h:37
#define FIN_TRADITIONAL_CRC32(crc)
Definition: pg_crc.h:47
#define INIT_TRADITIONAL_CRC32(crc)
Definition: pg_crc.h:46
#define COMP_TRADITIONAL_CRC32(crc, data, len)
Definition: pg_crc.h:48
static char * buf
Definition: pg_test_fsync.c:72
char * c
static pg_noinline void Size size
Definition: slab.c:607

References buf, COMP_TRADITIONAL_CRC32, crc, FIN_TRADITIONAL_CRC32, INIT_TRADITIONAL_CRC32, size, and TOLOWER.

Referenced by gist_te(), hashing(), parse_lquery(), and pushval_asis().