FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/src/mplutils.h at main · rocLv/matplotlib · GitHub
rocLv
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
src
/
mplutils.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (39 loc) · 840 Bytes
Breadcrumbs
matplotlib
/
src
/
mplutils.h
Copy path
File metadata and controls
49 lines (39 loc) · 840 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
-*- mode: c++; c-basic-offset: 4 -*-
*/
/*
Small utilities that are shared by most extension modules.
*/
#
ifndef
MPLUTILS_H
#
define
MPLUTILS_H
#
define
PY_SSIZE_T_CLEAN
#
include
<
stdint.h
>
#
ifdef
_POSIX_C_SOURCE
#
undef
_POSIX_C_SOURCE
#
endif
#
ifndef
_AIX
#
ifdef
_XOPEN_SOURCE
#
undef
_XOPEN_SOURCE
#
endif
#
endif
//
Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
#
if
defined(__sun) || defined(sun)
#
if
defined(_XPG4)
#
undef
_XPG4
#
endif
#
if
defined(_XPG3)
#
undef
_XPG3
#
endif
#
endif
#
include
<
Python.h
>
inline
double
mpl_round
(
double
v)
{
return
(
double
)(
int
)(v + ((v >=
0.0
) ?
0.5
: -
0.5
));
}
//
'kind' codes for paths.
enum
{
STOP
=
0
,
MOVETO
=
1
,
LINETO
=
2
,
CURVE3
=
3
,
CURVE4
=
4
,
CLOSEPOLY
=
0x4f
};
const
size_t
NUM_VERTICES
[] = {
1
,
1
,
1
,
2
,
3
,
1
};
#
endif
Back
|
FazBrowse Home
|
New Git URL