Skip to content

gh-132983: Reduce the size of _zstdmodule.h #133793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add guard defines
  • Loading branch information
AA-Turner committed May 10, 2025
commit 8e5e1ca0b003ba2dc63598a2f15c97686191b1c6
5 changes: 4 additions & 1 deletion Modules/_zstd/_zstdmodule.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#pragma once
/*
Low level interface to Meta's zstd library for use in the compression.zstd
Python module.
*/

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

#ifndef ZSTD_MODULE_H
#define ZSTD_MODULE_H
#include "Python.h"

#include "zstd.h"
Expand Down Expand Up @@ -154,3 +155,5 @@ set_zstd_error(const _zstd_state* const state,
extern void
set_parameter_error(const _zstd_state* const state, int is_compress,
int key_v, int value_v);

#endif
5 changes: 5 additions & 0 deletions Modules/_zstd/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ Low level interface to Meta's zstd library for use in the compression.zstd
Python module.
*/

#ifndef ZSTD_BUFFER_H
#define ZSTD_BUFFER_H
#include "_zstdmodule.h"
#include "Python.h"
#include "pycore_blocks_output_buffer.h"

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

return buffer->allocated == buffer->max_length;
}

#endif
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy