Skip to content

Commit 9750a61

Browse files
rwgkcopybara-github
authored andcommitted
Fix native_proto_caster.h include order (pybind11 include must be first).
PiperOrigin-RevId: 466412805
1 parent 542a52b commit 9750a61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pybind11_protobuf/native_proto_caster.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#ifndef PYBIND11_PROTOBUF_NATIVE_PROTO_CASTERS_H_
22
#define PYBIND11_PROTOBUF_NATIVE_PROTO_CASTERS_H_
33

4-
#include <Python.h>
4+
// pybind11 includes have to be at the very top, even before Python.h
55
#include <pybind11/cast.h>
66
#include <pybind11/pybind11.h>
77
#include <pybind11/pytypes.h>
88

9+
// IWYU
10+
#include <Python.h>
11+
912
#include <functional>
1013
#include <memory>
1114
#include <optional>

0 commit comments

Comments
 (0)