Skip to content

Commit 8e5e1ca

Browse files
committed
Add guard defines
1 parent d2e189f commit 8e5e1ca

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Modules/_zstd/_zstdmodule.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#pragma once
21
/*
32
Low level interface to Meta's zstd library for use in the compression.zstd
43
Python module.
54
*/
65

76
/* Declarations shared between different parts of the _zstd module*/
87

8+
#ifndef ZSTD_MODULE_H
9+
#define ZSTD_MODULE_H
910
#include "Python.h"
1011

1112
#include "zstd.h"
@@ -154,3 +155,5 @@ set_zstd_error(const _zstd_state* const state,
154155
extern void
155156
set_parameter_error(const _zstd_state* const state, int is_compress,
156157
int key_v, int value_v);
158+
159+
#endif

Modules/_zstd/buffer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ Low level interface to Meta's zstd library for use in the compression.zstd
33
Python module.
44
*/
55

6+
#ifndef ZSTD_BUFFER_H
7+
#define ZSTD_BUFFER_H
68
#include "_zstdmodule.h"
9+
#include "Python.h"
710
#include "pycore_blocks_output_buffer.h"
811

912
/* Blocks output buffer wrapper code */
@@ -102,3 +105,5 @@ _OutputBuffer_ReachedMaxLength(_BlocksOutputBuffer *buffer, ZSTD_outBuffer *ob)
102105

103106
return buffer->allocated == buffer->max_length;
104107
}
108+
109+
#endif

0 commit comments

Comments
 (0)