FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Python/strdup.c at master · python-emscripten/cpython · GitHub
python-emscripten
cpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Python
/
strdup.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
12 lines (11 loc) · 251 Bytes
Breadcrumbs
cpython
/
Python
/
strdup.c
Copy path
File metadata and controls
12 lines (11 loc) · 251 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
/* strdup() replacement (from stdwin, if you must know) */
char
*
strdup
(
const
char
*
str
)
{
if
(
str
!=
NULL
) {
char
*
copy
=
malloc
(
strlen
(
str
)
+
1
);
if
(
copy
!=
NULL
)
return
strcpy
(
copy
,
str
);
}
return
NULL
;
}
Back
|
FazBrowse Home
|
New Git URL