aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h
index 9200776d..c7260101 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -36,35 +36,8 @@
#define NS_XSD "http://www.w3.org/2001/XMLSchema#"
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-#define SERD_PAGE_SIZE 4096
-
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
-/** fread-like wrapper for getc (which is faster). */
-static inline size_t
-serd_file_read_byte(void* buf, size_t size, size_t nmemb, void* stream)
-{
- const int c = getc((FILE*)stream);
- if (c == EOF) {
- *((uint8_t*)buf) = 0;
- return 0;
- }
- *((uint8_t*)buf) = (uint8_t)c;
- return 1;
-}
-
-static inline void*
-serd_bufalloc(size_t size)
-{
-#ifdef HAVE_POSIX_MEMALIGN
- void* ptr;
- const int ret = posix_memalign(&ptr, SERD_PAGE_SIZE, size);
- return ret ? NULL : ptr;
-#else
- return malloc(size);
-#endif
-}
-
#endif // SERD_INTERNAL_H