Commit dbd051f1 authored by Kirill Smelkov's avatar Kirill Smelkov

golang: fmt.pxd -> _fmt.pxd + fmt.pxd import redirector

Follow the scheme established and used for all other packages, because
we will soon have fmt pyx part which, if named as fmt.pyx, will
intersect and conflict with fmt.py .
parent 288e16a7
# cython: language_level=2
# Copyright (C) 2019 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
"""Package fmt mirrors Go package fmt.
- `sprintf` formats text into string.
- `errorf` formats text into error.
NOTE: formatting rules are those of libc, not Go.
See also https://golang.org/pkg/fmt for Go fmt package documentation.
"""
from golang cimport string, error
cdef extern from "golang/fmt.h" namespace "golang::fmt" nogil:
string sprintf(const string &format, ...)
error errorf (const string &format, ...)
string sprintf(const char *format, ...)
error errorf (const char *format, ...)
# cython: language_level=2 # cython: language_level=2
# Copyright (C) 2019 Nexedi SA and Contributors. # Copyright (C) 2019-2020 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com> # Kirill Smelkov <kirr@nexedi.com>
# #
# This program is free software: you can Use, Study, Modify and Redistribute # This program is free software: you can Use, Study, Modify and Redistribute
...@@ -19,19 +19,8 @@ ...@@ -19,19 +19,8 @@
# See https://www.nexedi.com/licensing for rationale and options. # See https://www.nexedi.com/licensing for rationale and options.
"""Package fmt mirrors Go package fmt. """Package fmt mirrors Go package fmt.
- `sprintf` formats text into string. See _fmt.pxd for package documentation.
- `errorf` formats text into error.
NOTE: formatting rules are those of libc, not Go.
See also https://golang.org/pkg/fmt for Go fmt package documentation.
""" """
from golang cimport string, error # redirect cimport: golang.fmt -> golang._fmt (see __init__.pxd for rationale)
from golang._fmt cimport *
cdef extern from "golang/fmt.h" namespace "golang::fmt" nogil:
string sprintf(const string &format, ...)
error errorf (const string &format, ...)
string sprintf(const char *format, ...)
error errorf (const char *format, ...)
...@@ -208,6 +208,7 @@ def Extension(name, sources, **kw): ...@@ -208,6 +208,7 @@ def Extension(name, sources, **kw):
dependv.append('%s/golang/errors.pxd' % pygo) dependv.append('%s/golang/errors.pxd' % pygo)
dependv.append('%s/golang/_errors.pxd' % pygo) dependv.append('%s/golang/_errors.pxd' % pygo)
dependv.append('%s/golang/fmt.pxd' % pygo) dependv.append('%s/golang/fmt.pxd' % pygo)
dependv.append('%s/golang/_fmt.pxd' % pygo)
dependv.append('%s/golang/strings.pxd' % pygo) dependv.append('%s/golang/strings.pxd' % pygo)
dependv.append('%s/golang/sync.pxd' % pygo) dependv.append('%s/golang/sync.pxd' % pygo)
dependv.append('%s/golang/_sync.pxd' % pygo) dependv.append('%s/golang/_sync.pxd' % pygo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment