From 9e0a4d2f06e29f104b8060b3aac71c2ba9bde1f4 Mon Sep 17 00:00:00 2001 From: Michael Hatherly Date: Thu, 14 Jul 2016 22:13:57 +0200 Subject: [PATCH] Remove 'variable' RST directives Replace with `.. data::` instead since they are both used for the same kind of docstrings. --- doc/genstdlib.jl | 2 +- doc/stdlib/base.rst | 2 +- doc/stdlib/constants.rst | 26 +++++++++++++------------- doc/stdlib/io-network.rst | 8 ++++---- doc/stdlib/libdl.rst | 18 +++++++++--------- doc/stdlib/math.rst | 12 ++++++------ 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/doc/genstdlib.jl b/doc/genstdlib.jl index 7471fc109f49b9..9be91f56c5a439 100644 --- a/doc/genstdlib.jl +++ b/doc/genstdlib.jl @@ -3,7 +3,7 @@ module GenStdLib import Base.Docs: Binding, DocStr # Constants. -const DOCSTRING_DIRECTIVE = r"^(.. (function|type|variable|data):: ).*" +const DOCSTRING_DIRECTIVE = r"^(.. (function|type|data):: ).*" # Types. diff --git a/doc/stdlib/base.rst b/doc/stdlib/base.rst index 24e44f65b3963b..f961e60fa2270a 100644 --- a/doc/stdlib/base.rst +++ b/doc/stdlib/base.rst @@ -966,7 +966,7 @@ System A singleton of this type provides a hash table interface to environment variables. -.. variable:: ENV +.. data:: ENV .. Docstring generated from Julia source diff --git a/doc/stdlib/constants.rst b/doc/stdlib/constants.rst index 3f32de5e8ccdb4..e8530a79f0d414 100644 --- a/doc/stdlib/constants.rst +++ b/doc/stdlib/constants.rst @@ -3,79 +3,79 @@ Constants ========= -.. variable:: nothing +.. data:: nothing .. Docstring generated from Julia source The singleton instance of type ``Void``\ , used by convention when there is no value to return (as in a C ``void`` function). Can be converted to an empty ``Nullable`` value. -.. variable:: PROGRAM_FILE +.. data:: PROGRAM_FILE .. Docstring generated from Julia source A string containing the script name passed to Julia from the command line. Note that the script name remains unchanged from within included files. Alternatively see :data:`@__FILE__`\ . -.. variable:: ARGS +.. data:: ARGS .. Docstring generated from Julia source An array of the command line arguments passed to Julia, as strings. -.. variable:: C_NULL +.. data:: C_NULL .. Docstring generated from Julia source The C null pointer constant, sometimes used when calling external code. -.. variable:: VERSION +.. data:: VERSION .. Docstring generated from Julia source A ``VersionNumber`` object describing which version of Julia is in use. For details see :ref:`man-version-number-literals`\ . -.. variable:: LOAD_PATH +.. data:: LOAD_PATH .. Docstring generated from Julia source An array of paths (as strings) where the ``require`` function looks for code. -.. variable:: JULIA_HOME +.. data:: JULIA_HOME .. Docstring generated from Julia source A string containing the full path to the directory containing the ``julia`` executable. -.. variable:: ANY +.. data:: ANY .. Docstring generated from Julia source Equivalent to ``Any`` for dispatch purposes, but signals the compiler to skip code generation specialization for that field. -.. variable:: Sys.CPU_CORES +.. data:: Sys.CPU_CORES .. Docstring generated from Julia source The number of CPU cores in the system. -.. variable:: Sys.WORD_SIZE +.. data:: Sys.WORD_SIZE .. Docstring generated from Julia source Standard word size on the current machine, in bits. -.. variable:: Sys.KERNEL +.. data:: Sys.KERNEL .. Docstring generated from Julia source A symbol representing the name of the operating system, as returned by ``uname`` of the build configuration. -.. variable:: Sys.ARCH +.. data:: Sys.ARCH .. Docstring generated from Julia source A symbol representing the architecture of the build configuration. -.. variable:: Sys.MACHINE +.. data:: Sys.MACHINE .. Docstring generated from Julia source diff --git a/doc/stdlib/io-network.rst b/doc/stdlib/io-network.rst index 936258c7ac1195..edfea05d678352 100644 --- a/doc/stdlib/io-network.rst +++ b/doc/stdlib/io-network.rst @@ -7,19 +7,19 @@ General I/O ----------- -.. variable:: STDOUT +.. data:: STDOUT .. Docstring generated from Julia source Global variable referring to the standard out stream. -.. variable:: STDERR +.. data:: STDERR .. Docstring generated from Julia source Global variable referring to the standard error stream. -.. variable:: STDIN +.. data:: STDIN .. Docstring generated from Julia source @@ -1012,7 +1012,7 @@ Network I/O Converts the endianness of a value from that used by the Host to Little-endian. -.. variable:: ENDIAN_BOM +.. data:: ENDIAN_BOM .. Docstring generated from Julia source diff --git a/doc/stdlib/libdl.rst b/doc/stdlib/libdl.rst index 0d85f15bdc7fee..6da4dffbc60f73 100644 --- a/doc/stdlib/libdl.rst +++ b/doc/stdlib/libdl.rst @@ -22,14 +22,14 @@ The names in :mod:`Base.Libdl` are not exported and need to be called e.g. as `` Similar to :func:`dlopen`\ , except returns a ``NULL`` pointer instead of raising errors. -.. variable:: RTLD_DEEPBIND - RTLD_FIRST - RTLD_GLOBAL - RTLD_LAZY - RTLD_LOCAL - RTLD_NODELETE - RTLD_NOLOAD - RTLD_NOW +.. data:: RTLD_DEEPBIND + RTLD_FIRST + RTLD_GLOBAL + RTLD_LAZY + RTLD_LOCAL + RTLD_NODELETE + RTLD_NOLOAD + RTLD_NOW .. Docstring generated from Julia source @@ -65,7 +65,7 @@ The names in :mod:`Base.Libdl` are not exported and need to be called e.g. as `` Searches for the first library in ``names`` in the paths in the ``locations`` list, ``DL_LOAD_PATH``\ , or system library paths (in that order) which can successfully be dlopen'd. On success, the return value will be one of the names (potentially prefixed by one of the paths in locations). This string can be assigned to a ``global const`` and used as the library name in future ``ccall``\ 's. On failure, it returns the empty string. -.. variable:: DL_LOAD_PATH +.. data:: DL_LOAD_PATH .. Docstring generated from Julia source diff --git a/doc/stdlib/math.rst b/doc/stdlib/math.rst index 5df626d3f6fd7a..0b97384ccdf09e 100644 --- a/doc/stdlib/math.rst +++ b/doc/stdlib/math.rst @@ -904,37 +904,37 @@ Mathematical Functions * :obj:`RoundUp` * :obj:`RoundDown` -.. variable:: RoundNearest +.. data:: RoundNearest .. Docstring generated from Julia source The default rounding mode. Rounds to the nearest integer, with ties (fractional values of 0.5) being rounded to the nearest even integer. -.. variable:: RoundNearestTiesAway +.. data:: RoundNearestTiesAway .. Docstring generated from Julia source Rounds to nearest integer, with ties rounded away from zero (C/C++ :func:`round` behaviour). -.. variable:: RoundNearestTiesUp +.. data:: RoundNearestTiesUp .. Docstring generated from Julia source Rounds to nearest integer, with ties rounded toward positive infinity (Java/JavaScript :func:`round` behaviour). -.. variable:: RoundToZero +.. data:: RoundToZero .. Docstring generated from Julia source :func:`round` using this rounding mode is an alias for :func:`trunc`\ . -.. variable:: RoundUp +.. data:: RoundUp .. Docstring generated from Julia source :func:`round` using this rounding mode is an alias for :func:`ceil`\ . -.. variable:: RoundDown +.. data:: RoundDown .. Docstring generated from Julia source