ringabout
c0861142f8
fixes strictdefs warnings for stdlibs [part two] ( #24514 )
...
After some cleanups for stdlibs, then we should enable warningaserror
for all tests
2024-12-06 05:40:48 +01:00
ringabout
2df633180a
enable experimental:strictDefs ( #24225 )
2024-11-23 22:01:39 +01:00
Tomohiro
d6633ae1da
Change how to multiply 1.5 to ints to reduce overflow ( #24257 )
2024-10-07 23:18:11 +02:00
bptato
30cf570af9
Fix std/base64.decode out of bounds read ( #23526 )
...
inputLen may end up as 0 in the loop if the input string only includes
trailing characters. e.g. without the patch, decode(" ") would panic.
2024-04-22 09:44:33 +02:00
tersec
26f2ea149c
remove unnecessary side-effects from base64.encode(mime) ( #22986 )
...
Fixes https://github.com/nim-lang/Nim/issues/22985
2023-11-25 20:52:42 +01:00
Amjad Ben Hedhili
5b195ab0f0
Add safe parameter to base64.encodeMime ( #20559 )
...
* Improve `encodeMime` signature
* `string` to `openArray[char or byte]`
* `safe` parameter
* Fix
* Revert "Fix"
This reverts commit a394c505c2 .
* Remove encodeMime's openArray overload
* Document the `safe` parameter
* Add changelog entry
2022-10-21 09:25:25 +02:00
Amjad Ben Hedhili
944e4cf585
Remove unused base64.encode overload ( #20369 )
...
* Remove unused `base64.encode` overload
* [skip ci] Remove commented code
* [skip ci] var -> let
* [skip ci] Remove mentions of the string overload
* Remove `SomeInteger` overload
* Fix CI
* Fix CI
* Deprecate `SomeInteger` overload
* [skip ci] Add changelog entry
* Revert "Remove `SomeInteger` overload"
This reverts commit 79a2963a21 .
* Revert "[skip ci] Add changelog entry"
This reverts commit 186f17eb39 .
* Revert "Revert "Remove `SomeInteger` overload""
This reverts commit 8005318ee4 .
* Update lib/pure/base64.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-10-09 15:54:21 -04:00
Amjad Ben Hedhili
f7f375f59d
Optimize base64.encodeMime ( #20409 )
...
* Optimize `base64.encodeMime`
* 5x faster for common scenarios, 13x faster if `lineLen` <= encoded
string's length or `newLine` is empty.
* Changed `lineLen`'s type to `Positive` to disallow `0`.
* Fix
2022-09-25 15:23:23 -04:00
Sizhe Zhao
b2c5d7b4ff
Documentation: Fix word usage ( #19529 )
2022-02-14 22:15:59 +00:00
Timothee Cour
38b41f893a
fix #17941 : UnusedImport works for var/let/const/type invoked inside a generic ( #17942 )
...
* fix #17941 : UnusedImport works for var/let/const/type invoked inside a generic
* fixup
2021-05-08 09:56:46 +02:00
flywind
9f75e8abc1
[std/base64] uses runnableExamples ( #17882 )
...
* [std/base64] uses runnableExamples
* Update lib/pure/base64.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-05-01 07:27:50 +02:00
Andrey Makarov
42687457b0
further progress on rst roles & directives ( fix #17646 ) ( #17659 )
...
* further progress on rst roles & dir-s (fix #17646 )
* fix documents according to the messages
* fix bug 17 from #17340
2021-04-08 19:00:14 +02:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
flywind
fcb5cf643c
use single backtick ( #17181 )
2021-02-24 21:47:27 -08:00
Juan Carlos
0c8ce2dccf
Save some alloc on base64 using encodeSize ( #16465 )
2020-12-27 12:02:10 +01:00
Andreas Rumpf
cbdda631db
base64: fixes the error message for an invalid base64 input character [backport:1.2]
2020-09-20 00:05:41 +02:00
narimiran
46aacf917f
Fix style inconsistencies due to the previous commit
2020-07-06 11:24:43 +02:00
narimiran
ebaf603c84
revert 0944b0f4
2020-07-06 10:55:51 +02:00
Araq
48213c7428
encodeMIME should be encodeMime by our coding guidelines
2020-04-01 14:10:27 +02:00
Andreas Rumpf
fc5dd11b3d
fixes #13722 ( #13729 )
...
* fixes #13722
* better fix
2020-03-23 15:47:10 +01:00
Araq
dae9865b14
fight the code bloat in base64.nim
2020-03-20 10:46:58 +01:00
Juan Carlos
70d93636cb
Add Base64 safe ( #13672 )
...
* Implement RFC-4648 Section-7
* https://github.com/nim-lang/Nim/pull/13672#issuecomment-600993466
2020-03-20 10:21:42 +01:00
3n-k1
0944b0f441
[backport] Fix style issues in lib/, tools/, and testament/. Fixes #12687 . ( #12754 )
2019-11-28 08:32:11 +01:00
Andy Davidoff
bd8f49cbd3
replace some runtime repr in stdlib for gc:arc ( #12716 )
2019-11-25 10:13:30 +01:00
Jjp137
93461aee34
Fix many broken links
...
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
2019-10-22 17:59:12 -07:00
treeform
5ba932e43c
About 50% faster base64 implemention. ( #12436 )
2019-10-17 09:50:00 +02:00
narimiran
15895ebc3f
[backport] run nimpretty on hashes
2019-09-30 13:58:10 +02:00
Araq
5abe880469
last stdlib cleanups
2019-09-21 06:43:37 +02:00
Araq
bc7733827d
make more parts of the stdlib compile with --styleCheck:error
2019-07-10 15:48:30 +02:00
Andreas Rumpf
a68fe3d082
fixes #11364 ( #11383 )
2019-06-03 08:46:57 +02:00
Zed
3b4952da94
Fix header inconsistencies in documentation ( #11071 )
2019-04-23 08:40:20 +02:00
Thomas T. Jarløv
15aea78405
better docs: base64 ( #10371 )
2019-01-19 15:21:07 +01:00
Andreas Rumpf
0fad659bf7
make more tests green
2018-04-30 02:52:58 +02:00
Daniil Yarancev
6ac37ee2fb
Small base64.nim refactor ( #5755 )
...
* Small changes (var to let)
* Some additional `var` to `let`
* Fix
* Finally removed immediate
2017-04-25 20:47:26 +02:00
Florent
9965123098
Fixes #5457 - StdLib base64 encodeInternal crashes with out of bound exception ( #5464 )
2017-03-02 08:54:45 +01:00
Yuriy Glukhov
8cd4ec978c
Fixed base64 encode
2016-04-11 16:47:18 +03:00
Dominik Picheta
6b002e805e
Added examples and more docs to base64 module.
2015-09-17 20:44:16 +01:00
Adam Strzelecki
43bddf62dd
lib: Trim .nim files trailing whitespace
...
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
Dominik Picheta
69d4eb14bc
Some docgen fixes.
2014-09-13 15:35:09 +01:00
Araq
d69e8f4de4
updated base64.nim
2014-08-28 01:19:17 +02:00
Araq
11b6958755
big rename
2014-08-27 23:42:51 +02:00
Dominik Picheta
030c2d6deb
Fixes base64 crash.
2014-07-26 02:14:26 +01:00
onionhammer
6901a8cb13
Added base64 encode overload for arrays of integers/bytes
2013-10-30 09:08:05 -05:00
Araq
50403afb5c
fixes base64 module
2013-08-15 00:22:48 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28
Removes executable bit for text files.
2013-03-16 23:53:07 +01:00
Araq
5b28d08203
non-nil AST; continue after errors for IDE support
2011-02-12 19:24:20 +01:00
Araq
56e963b465
base64: decoding works
2010-10-23 17:35:26 +02:00
Araq
770cc71640
added base64 module; decoding still broken
2010-10-23 17:19:32 +02:00