ridiculousfish
2fb1d5900d
Use true and false for bool, not 0 and 1
2017-01-26 12:51:22 -08:00
ridiculousfish
59a3968fd2
Switch to using unique_ptr in env_node_t
...
Makes our memory management of the variable stack more explicit
2017-01-26 12:51:22 -08:00
ridiculousfish
8e577b01bc
Migrate "unspecified scope" logic for set into var_stack_t
2017-01-26 12:51:22 -08:00
ridiculousfish
8d2dfdf2c9
Migrate environment variable cache into var_stack_t
2017-01-26 12:03:14 -08:00
ridiculousfish
dabc34e0f9
Migrate next_scope_to_search into var_stack_t
2017-01-26 11:32:45 -08:00
ridiculousfish
3525a9d7ee
Make env_node_t's destructor private
...
Migrate responsibility for popping the environment into var_stack_t
2017-01-26 11:20:09 -08:00
ridiculousfish
61887c061b
Migrate responsibility for node creation into var_stack_t
2017-01-26 11:06:03 -08:00
ridiculousfish
e4fd1d5f5a
Wrap up the variable stack in a little struct
...
First step towards cleaning up env.cpp's global variables
2017-01-26 10:38:55 -08:00
ridiculousfish
afe54df843
Eliminate the 'global' var_table_t variable in env.cpp
...
This can always be trivially found from 'global_env'
2017-01-26 10:32:31 -08:00
ridiculousfish
37578d8b39
Add some additional commenting around iothreads
2017-01-26 09:40:18 -08:00
ridiculousfish
2f29473efc
Remove legacy iothread_perform templates
...
We no longer need to have overloads for function pointers.
2017-01-26 09:40:18 -08:00
ridiculousfish
f29139e853
Change clients of file_detection_context_t to use lambdas
...
Allows for eliminating file_detection_context_t
2017-01-26 09:40:17 -08:00
ridiculousfish
87152877b2
Switch to use lambda-style iothread for autosuggestions
...
Allows eliminating autosuggestion_context_t
2017-01-26 09:40:17 -08:00
ridiculousfish
8af00d2b78
Adopt lambda-style iothread_perform in syntax highlighting
...
Allows eliminating background_highlight_context_t
2017-01-26 09:40:17 -08:00
ridiculousfish
a3dbca90d5
g++-friendly 'Rework iothread_perform for void return types'
...
Allows iothread_perform to work with void return types on both
g++ and clang
This reverts commit 1040b255c72571581a7de283d7f49c4633c851b4
and reintroduces ac9a0f0dbfeb8b76207202dcda2032faff6ad541
2017-01-26 09:40:17 -08:00
Kurtis Rader
a447a9aeff
correct handling of SIGHUP by interactive fish
...
This is a partial fix for issue #3737 . It only addresses the SIGHUP
aspect of the problem. Fixing SIGTERM is TBD.
2017-01-24 15:24:13 -08:00
Kurtis Rader
319e65af05
improve sanity check code
2017-01-24 15:24:13 -08:00
Fabian Homborg
1040b255c7
Revert "Rework iothread_perform for void return types"
...
This reverts commit ac9a0f0dbfeb8b76207202dcda2032faff6ad541, which massively broke fish built with gcc.
Fixes #3770 .
2017-01-24 17:33:03 +01:00
Kurtis Rader
bf2d61c6fd
Revert "improve sanity check code"
...
This reverts commit 7e6543c4cd0158e1da6810e89ab1c785eb8681c3.
2017-01-24 07:34:51 -08:00
Kurtis Rader
64485167e9
Revert "correct handling of SIGHUP by interactive fish"
...
This reverts commit 31adc221d92a2107f2069ebae7646070d69abe48.
2017-01-24 07:34:15 -08:00
Kurtis Rader
31adc221d9
correct handling of SIGHUP by interactive fish
...
This is a partial fix for issue #3737 . It only addresses the SIGHUP
aspect of the problem. Fixing SIGTERM is TBD.
2017-01-23 19:42:27 -08:00
Kurtis Rader
7e6543c4cd
improve sanity check code
...
Partial fix for #3737
2017-01-23 19:42:26 -08:00
ridiculousfish
ac9a0f0dbf
Rework iothread_perform for void return types
...
Need to use a template specialization so we don't try to create
a variable of type void
2017-01-23 13:56:43 -08:00
ridiculousfish
699d294ac1
Adopt iothread_perform-lambdas in fish_tests.cpp
2017-01-23 11:45:28 -08:00
ridiculousfish
1cfbd62266
Enable use of std::function and lambdas in iothread_perform
2017-01-23 11:35:22 -08:00
ridiculousfish
02ddc20c87
Correct signatures of main_thread_request_t's deleted functions
2017-01-23 10:58:38 -08:00
ridiculousfish
520e567390
Eliminate the old-style iothread_perform_on_main
...
All clients now use the std::function form (i.e. lambdas)
2017-01-23 10:46:42 -08:00
ridiculousfish
144e7b0616
Adopt lamba-style perform_on_main in the tests
2017-01-23 10:45:48 -08:00
ridiculousfish
fe8e99138d
Adopt lambda-style perform_on_main in expand.cpp
...
Allows eliminating find_job_data_t
2017-01-23 10:44:36 -08:00
ridiculousfish
e0abfee370
Adopt lambda-style perform_on_main in complete.cpp
...
Allows eliminating complete_load_no_reload
2017-01-23 10:43:34 -08:00
ridiculousfish
66a0f18410
Another fix for Linux build
2017-01-23 10:39:53 -08:00
ridiculousfish
3181bdcb9b
Attempt to fix the Linux build
2017-01-23 10:38:55 -08:00
ridiculousfish
e1adc3a6b2
Make iothread's perform_on_main use std::function
...
This will allow clients to use lambdas instead of having to
define an out-of-line function
2017-01-23 10:37:16 -08:00
ridiculousfish
7a76efa629
Use set_cloexec instead of fcntl directly in iothread.cpp
2017-01-23 09:59:56 -08:00
ridiculousfish
216f7d912a
Clean up some of the memory management in iothread.cpp
...
Store requests directly on the queue, instead of via a heap allocation
2017-01-23 09:56:02 -08:00
ridiculousfish
d373f1fc1d
Lower-snake-case for MainThreadRequest_t and SpawnRequest_t
...
Matches style of rest of the project
2017-01-23 09:34:30 -08:00
ridiculousfish
36a0f745cd
Fix some bogus error messages in builtin_commandline
2017-01-23 09:32:50 -08:00
ridiculousfish
ab189a75ab
Switch a job's process list from a linked list to a vector of pointers
...
Clarifies and simplifies the memory management around process handling.
2017-01-23 09:28:34 -08:00
ridiculousfish
f4476100f2
Remove comment about job_iterator_t being used from signal handlers
...
It is no longer used from signal handlers, and has not been for a while
2017-01-22 00:59:50 -08:00
ridiculousfish
6bdab62358
Make io_buffer_t::create return a shared_ptr
...
Eliminates some manual memory management
2017-01-22 00:44:04 -08:00
ridiculousfish
009a677e0d
Use the STL's make_unique if available
...
Fixes a build error with g++ 6.1
Fixes #3759
2017-01-22 00:32:08 -08:00
ridiculousfish
439f233ccc
Make fire_event_callback take a std::function instead of function pointer
2017-01-21 17:15:45 -08:00
ridiculousfish
a91dad35db
Use unique_ptr instead of new for history tests
2017-01-21 17:14:56 -08:00
ridiculousfish
6f745762bb
Make universal_notifier_t use unique_ptr instead of raw pointers
2017-01-21 16:56:45 -08:00
ridiculousfish
f0065cda13
Clean up event_t handling
...
Use shared_ptr instead of the silly killme list
2017-01-21 16:48:07 -08:00
ridiculousfish
8a0d4854e8
Replace auto_ptr with unique_ptr
2017-01-21 16:10:42 -08:00
ridiculousfish
b3fff2d779
Switch to using unique_ptr for builtin_test
...
Removes a lot of terrifying manual memory management
2017-01-21 16:08:53 -08:00
ridiculousfish
754b0e9b91
Use unique_ptr in string_replace()
...
Eliminates some manual calls to delete
2017-01-21 15:47:12 -08:00
ridiculousfish
3139ad0d4d
Use unique_ptr in builtin_commandline_scoped_transient_t
...
Allows removing a manual call to delete
2017-01-21 15:45:38 -08:00
ridiculousfish
3272505891
Eliminate the "Clean up the block stack" logic in eval_block_node
...
The block stack is now sound, and no longer needs this ancient
cleanup logic, which tried to account for cases where blocks
were pushed but never popped.
2017-01-21 15:42:35 -08:00